{$CLEO .cs}


$Sweet_Car = 0
023C: load_special_actor 'psycho' as 1 // models 290-299
038B: load_requested_models
32@ = 0
33@ = 0
jump @to 

:respawn 
wait 0
if
32@ >= 15000
jf @wait 
32@ = 0

Jump @to
:wait 
if 
$onmission == 0
then

0296: unload_special_actor 1
end_thread
end

jump @respawn
:to
0@ = actor.Create(23, #SPECIAL01, 3920.5974, -973.889, 1638.3688)
actor.Health(0@) = 2000

0446: set_actor 0@ dismemberment_possible 0
33@ = 0
actor.SetWalkStyle(0@ , "player")
actor.SetImmunities(0@,1,1,1,1,1)
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 0 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 1 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 8 // see ped.dat
//077A: set_actor 0@ acquaintance 4 to_actors_pedtype 23 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 7 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 20 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 6 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 9 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 10 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 11 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 12 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 14 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 13 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 15 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 16 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 24 // see ped.dat
077A: set_actor 0@ acquaintance 4 to_actors_pedtype 25 // see ped.dat
//077A: set_actor 0@ acquaintance 4 to_actors_pedtype 23 // see ped.dat
marker.CreateAboveActor(1@, 0@)
018B: set_marker 1@ radar_mode 4
marker.SetIconSize(1@, 2)
//05E2: AS_actor 0@ kill_actor $player_actor 
05DE: AS_actor 0@ walk_around_ped_path
0A09: set_actor 0@ muted 1 // versionB

7@ = 30.0
8@ = 30.0
9@ = 30.0
32@ = 0

:start_random
wait 0
0209: 18@ = random_int_in_ranges 0 6

wait 0
0209: 18@ = random_int_in_ranges 0 6
if
18@ == 0 
then
00A1: put_actor 0@ at  4020.281 -938.2732 35.7088
actor.Angle(0@) = 312.8326
jump @main
end
if
18@ == 1 
then
00A1: put_actor 0@ at  4003.313 -864.7812 35.7088
actor.Angle(0@) =   276.832
jump @main
end
if
18@ == 2
then
00A1: put_actor 0@ at  4097.2251 -918.4691 35.7088
actor.Angle(0@) = 338.4076
jump @main
end
if
18@ == 3
then
00A1: put_actor 0@ at  4038.0273 -970.1396 35.7088
actor.Angle(0@) =  267.9288
jump @main
end
if
18@ == 4
then
00A1: put_actor 0@ at  4107.5435 -1001.7543 35.7088
actor.Angle(0@) =   58.8077
jump @main
end
if
18@ == 5
then
00A1: put_actor 0@ at  4022.9546 -1010.7889 35.7088
actor.Angle(0@) =   268.5409
jump @main
end
jump @start_random




:main
wait 0
04C4: store_coords_to 3@ 4@ 5@ from_actor 0@ with_offset 0.0 0.0 0.0

if  or
$actor_sweet == 0 
$onmission == 0
then



jump @clear_it 
end
:triggers_toys
if
$Sweet_Car >= 15
then
060A: create_decision_maker_type 4 store_to 28@  // decision\allowed\m_.ped files
07E5: copy_decision_maker 28@ to 31@
060B: set_actor 0@ decision_maker_to 31@
7@ = 100.0
8@ = 100.0
9@ = 100.0
018B: set_marker 1@ radar_mode 2

end
jump @get
if
056D:   actor 0@  defined
then
:clear_it
0296: unload_special_actor 1

actor.DestroyInstantly(0@)

end
end_thread







:get
0209: 17@ = random_int_in_ranges 0 3
if
17@ == 0
then
0AE1: 30@ = random_actor_near_point 3@ 4@ 5@ in_radius 30.0 find_next 1 pass_deads 1

end
if
17@ == 1
then
30@ = actor.EmulateFromPlayer($PLAYER_CHAR)
end
if
17@ == 2
then

if
056D:   actor $second_player_actor  defined

then
30@ = actor.EmulateFromPlayer($second_player)
end
end
       {
:spot
if
056D:   actor 30@  defined
then
089F: get_actor 30@ pedtype_to 20@
if  and
not 20@ == 17
not 20@ == 23
then
if
0364:   actor 0@ spotted_actor 30@
then

05E2: AS_actor 0@ kill_actor 30@
end    
end
end  }
if and
0364:   actor 0@ spotted_actor $PLAYER_ACTOR
0104:   actor $PLAYER_ACTOR near_actor 0@ radius 30.0 30.0 30.0 sphere 0

then
018B: set_marker 1@ radar_mode 2

end 
if
056D:   actor $second_player_actor  defined
then
if and
0364:   actor 0@ spotted_actor $second_player_actor
0104:   actor $second_player_actor near_actor 0@ radius  30.0 30.0 30.0 sphere 0
then
018B: set_marker 1@ radar_mode 2
end
end
if 
056D:   actor 30@  defined
then
if and
32@ > 12000
0364:   actor 0@ spotted_actor 30@
0104:   actor 30@ near_actor 0@ radius  7@ 8@ 9@ sphere 0
then
089F: get_actor 30@ pedtype_to 20@
if  and
not 20@ == 17
not 20@ == 23
then
32@  = 0
05E2: AS_actor 0@ kill_actor 30@

end
end
end
if and
056D:   actor 0@  defined 
33@ >= 30000
then
actor.DestroyInstantly(0@)
33@ = 0 
32@ = 0
wait 1000
jump @respawn 
end
:bomb
if
056D:   actor 30@  defined
then
if
0105:   actor 30@ near_actor 0@ radius 3.0 3.0 3.0 sphere 0 on_foot
then
089F: get_actor 30@ pedtype_to 20@
if  and
not 20@ == 17
not 20@ == 23
then
0948: create_explosion_at 3@ 4@ 5@ type 11 camera_shake 3.0
05BE: AS_actor 30@ die
05BE: AS_actor 0@ die

actor.DestroyInstantly(0@)
32@ = 0
jump @respawn 
end
end
end

if
33@ > 25000
then
33@ = 0
078F: AS_actor 0@ climb 1
05DE: AS_actor 0@ walk_around_ped_path
end
if 
$actor_sweet == 0 
then

jump @goto
end
jump @main

:goto
0296: unload_special_actor 1
0A93: end_custom_thread
0A92: create_custom_thread "battle_maps\gang_house\luigi.cs"

end_thread